Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CASMCMS-8952: Improve handling of no-op situations #282

Merged
merged 5 commits into from
Mar 27, 2024

Conversation

mharding-hpe
Copy link
Contributor

CSM 1.5.1 version of #281

One thing to note is that this PR contains similar "empty node list" checks for some PCS functions, but in those cases, it didn't seem as obvious how to return an "empty" value to reflect that it was a no op. Currently this PR just logs an error. I did that instead of a warning because I am pretty sure the subsequent call to PCS is guaranteed to fail if we don't give it any nodes. Ultimately if we are in this situation, it means there is a bug in BOS, so the question just is how can we fail in a way to make it easiest to debug. Personally I think it should raise an Exception of some kind if it sees that the node list is empty. I just wasn't sure what kind of exception.

But even as is, this PR hopefully would make the debugging a little easier than it otherwise would be, since the logged errors would point to why the subsequent PCS call failed.

src/bos/operators/status.py Show resolved Hide resolved
src/bos/operators/utils/clients/pcs.py Outdated Show resolved Hide resolved
src/bos/operators/utils/clients/pcs.py Show resolved Hide resolved
src/bos/operators/utils/clients/pcs.py Show resolved Hide resolved
src/bos/operators/utils/clients/pcs.py Outdated Show resolved Hide resolved
@mharding-hpe mharding-hpe merged commit 254f666 into release/2.10 Mar 27, 2024
7 checks passed
@mharding-hpe mharding-hpe deleted the casmcms-8952-csm-1.5 branch March 27, 2024 18:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants